import request from '@/utils/request'

export function allProject() {
  return request({
    url: '/business/project/all',
    method: 'get'
  })
}

/**
 * 分页查询项目列表
 */
export function pageListProject(query) {
  return request({
    url: '/business/project/page/list',
    method: 'get',
    params: query
  })
}

// 查询项目列表2
// export function listTProject2(query) {
//   return request({
//     url: '/business/project/list2',
//     method: 'get',
//     params: query
//   })
// }

// 查询项目详细
export function getProject(projectId) {
  return request({
    url: '/business/project/' + projectId,
    method: 'get'
  })
}

// 新增项目
export function addProject(data) {
  return request({
    url: '/business/project',
    method: 'post',
    data: data
  })
}

// 修改项目
export function updateProject(data) {
  return request({
    url: '/business/project',
    method: 'put',
    data: data
  })
}

// 删除项目
export function delProject(projectId) {
  return request({
    url: '/business/project/' + projectId,
    method: 'delete'
  })
}

export function recordProject(data) {
  return request({
    url: '/business/project/record',
    method: 'post',
    data: data
  })
}
